﻿#pragma once

#include "MainWindow.h"

#include <QTableWidget>
#include <QTableWidgetItem>

namespace Ui
{
class CtrlWidget;
}

class CtrlWidget : public QWidget
{
    Q_OBJECT

  public:
    explicit CtrlWidget(QWidget *parent);
    ~CtrlWidget();

    void initialize();                          // 初始化树状视图
    void update_widget();                       // 刷新控件数据
    void deal_with_event();                     // 处理消息

  public slots:
    void apply();
    void cancel();
    void remove();
    void delete_();
    
  private:
    Ui::CtrlWidget *ui;

    MainWindow *m_parent; // 保存父窗口
};
